<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * group.php
 * @author ranuandra
 *
 * 12 Sep 2011 08:54:19
 *
 * 
 */
class Model_Group extends ORM
{
   protected $_has_many = array(
								'detailmaterialout' 	=> array('model' => 'detailmaterialout')
							);
	
	private $_form = array('name' 		=> '',
							);
							
	private $_field = array(
						'name',
					);

	public function rules()
	{
		return array(
			'name' 	   => array(
			 						array('min_length', array(':value', 0)),
			 ),

		);
	}
	
	public function get_form()
	{
		return $this->_form;
	}
	
	public function get_field()
	{
		return $this->_field;
	}
	
	public function create_group($values)
	{
		return $this->values($values, $this->_field)->create();
	}
}